<template>
  <div class="params2">
    <h1>这里是params2，用来接收参数</h1>
    <div>{{data.name}}</div>
  </div>
</template>
<script lang="ts" setup name='params2'>
import { ref } from "vue";
import {useRoute,useRouter} from 'vue-router'
const route = useRoute()
const router = useRouter()
console.log(route.query)
console.log(route.params)
console.log(router.push)//function
console.log(router.replace)//function
const data = route.params
// console.log(route.params)
</script>
<style scoped>
.params2 {
  width: 80vw;
  height: 80vh;
  border: 1px solid red;
}
</style>
